#include "library.h"

#include <iostream>
#include "trade.h"

extern "C" {
    trade *trade_new(const char *config_path) {
        return new trade(config_path);
    }

    void trade_start(trade *trade) {
        //trade->setUser(custid,password);
        trade->Start();
    }

    void SingleOrderInsert(trade *trade, ReqSingleOrderInsertField *reqInstance) {
        //auto tad = new trade("/home/drogon/config.ini");
        trade->SingleOrderInsert(reqInstance);
        //return trade->pOrderField_m;
    }

    void UserLogion(trade *trade, ReqUserLoginField *userInfo) {
        trade->UserLogin(userInfo);
    }

    OrderField get_pOrderField(trade *trade) {
        return trade->pOrderField_m;
    }
}

